<?=$this->render('header.phtml') ?>

<?=$this->render('logo.phtml') ?>

<?=$this->render('sidelist.phtml') ?>

<div class="addcat" id="addcategory">
  	<form method="post" action="<?= $this->url(array('action' => 'add'), 'categories') ?>">New: <input type="text" name="newcat" size="20" /><input type="submit" value="Add" />
  	</form>  <a href="#" style="font-style: italic; font-size: 0.75em;" onclick="javascript:getElementById('addcategory').style.display = 'none';">Cancel</a>
  </div>

<?php if (isset($this->message)): ?>
 <?php if (is_array($this->message)): ?>
  <p class="message">Sorry, it looks like you forgot to fill in the information.</p>
 <?php endif; ?>
<?php endif; ?>

<form method="post" action="<?= $this->url(array('action' => 'save', 'uid' => $this->uid), 'passwordadmin') ?>">
<div class="password_view">
<h4>Summary: <input<?php if (is_array($this->message['username'])) echo ' style="border: 5px solid red;"'; ?> type="text" name="summary" value="<?= $this->summary ?>" size="35"></h4>
<table cellpadding="0" cellspacing="0">
 <tr>
  <td class="left_col">Category:</td>
  <td><span><select name="category" id="category"><option value="0">Uncategorized</option>
 <?php if (count($this->categories) >= 1): ?>
  <?php foreach ($this->categories as $cat): ?>
   <option value="<?= $cat['uid'] ?>"<?php if ($cat['uid'] == $this->category) echo 'selected="selected"' ?>><?= $cat['category'] ?></option>
  <?php endforeach; ?>
 <?php endif; ?>
 </select>
  <a href="#" onclick="javascript:getElementById('addcategory').style.display = 'block';">New</a>
  </span>
  </td>
 </tr>
 <tr>
  <td class="left_col">Username:</td>
  <td><span><input<?php if (is_array($this->message['username'])) echo ' style="border: 5px solid red;"'; ?> type="text" name="username" value="<?=$this->username ?>" size="30"></span></td>
 </tr>
 <tr>
  <td class="left_col">Password:</td>
  <td><span><input<?php if (is_array($this->message['password'])) echo ' style="border: 5px solid red;"'; ?> type="text" name="password" value="<?=$this->password ?>" size="30"></span></td>
 </tr>
 <tr>
  <td class="left_col">Web site:</td>
  <td><span><input type="text" name="website" value="<?=$this->website ?>" size="30"></span></td>
 </tr>
 <tr>
  <td class="left_col">Notes:</td>
  <td><span><input type="text" name="notes" value="<?=$this->notes ?>" size="30"></span></td>
 </tr>
</table>
<p><input type="submit" value="Save"></p>
</form>
</div>

<div class="controlset">
<a href="<?= $this->url(array('action' => 'edit', 'uid' => $this->uid), 'passwordadmin') ?>" title="Edit"><img src="/images/edit.png" alt="Edit"></a> <a href="<?= $this->url(array('action' => 'delete', 'uid' => $this->uid), 'passwordadmin') ?>" title="Delete"><img src="/images/delete_red.png" alt="Delete"></a> <a href="/" title="Add"><img src="/images/add.png" alt="Add"></a>
</div>


<?=$this->render('footer.phtml') ?>